// ==UserScript==
// @name           IkariamTools
// @namespace      IkariamTools
// @description    Collection of tools for Ikariam
// @include        http://s*.ikariam.tld/index.php*
// @require        support.js
// @require        jquery.js
// @require        resourceloadbar.js
// ==/UserScript==

alert(html);
function init() {
  var view = urlParse("view");
  var action = urlParse("action");
  switch (view) {
    case "options": OptionsMenu(); break;
    case "embassy": getAllianceList(); break;
    
  }
}

function getAllianceList() {
var membercount = 0
$("#memberList tbody tr").each(function(i){
	var $memberinfo = $(this).children();
	GM_log($memberinfo.eq(0).text());
	var membername = $memberinfo.eq(1).text();
  	membercount = i;

});	
//	var AllianceList = new Array();
}

function saveArray() {

}

function OptionMenu() {
var html = '<div class="contentBox01h">\n';
html +='    <h3 class="header"><span class="textLabel">Ikariam Tools</span></h3>\n';
html +='    <div class="content">\n';
html +='       <p>Here you can change the active plugins for Ikariam Tools.</p>\n';
html +='      <table cellspacing="0" cellpadding="0">\n';
html +='      \n';
html +='      <tbody>\n';
html +='         <tr>\n';
html +='            <th>Highlight Alliance Treaties</th>\n';
html +='            <td>\n';
html +='               <input type="checkbox" checked="true" id="alliancetreatyhighlight"/>\n';      
html +='            </td>\n';
html +='          </tr>\n';
html +='      </tbody></table>    \n';
html +='      </div>\n';
html +='      <div class="footer"/>\n';
html +='    </div>\n';
$("#vacationMode").before(html);

$("#alliancetreatyhighlight").click( function(){
	GM_log("Click");
});

}


init();